package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class ModifyMyInfoMethods extends BaseMethods {

    private static ModifyMyInfoMethods m_ins = null;

    public static ModifyMyInfoMethods getInstance() {
        if (m_ins == null) {
            synchronized (ModifyMyInfoMethods.class) {
                if (m_ins == null) {
                    m_ins = new ModifyMyInfoMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Personal/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void update_user(Subscriber<Object> subscriber,
                      int uid,
                      String hashid ,
                      String face  ,
                      String nickname  ,
                      String city    ,
                      String birth  ,
                      String vocation  ,
                      String album  ,
                      String chatting
    ) {
        Observable observable = initService().update_user(System.currentTimeMillis()+"",
                "881d0b91a6789f8a0744d0463895efa9",uid,hashid,face,nickname,city,birth,vocation,album,chatting
        );
        toSubscribe(observable, subscriber);
    }
}
